package types // Package types import "xemo.top/docker/docker/api/types"

type Volume struct {
	CreatedAt string `json:"CreatedAt,omitempty"`
	// Name 卷使用的卷驱动程序的
	// Name of the volume driver used by the volume
	// Required: true
	Driver string `json:"Driver"`
	// User-defined key/value metadata
	// Required: true
	Labels map[string]string `json:"Labels"`
	// Mount path of the volume on the host.
	// Required: true
	Mountpoint string `json:"Mountpoint"`
	//Name of the volume
	// Required: true
	Name string `json:"Name"`
	// The driver specific options used when creating the volume
	// Required:true
	Options map[string]string `json:"Options"`
	// The level at which the volume exists.Either `global` for cluster-wide,or `local` for machine level
	// Required: true
	Scope string `json:"Scope"`
	// Low-level details about the volume,provided by the volume driver.Details are returned as a map with key/value pairs:`{"key":"value","key2":"value2"}`
	//
	// The `Status` field is optional ,and is omitted if the volume driver does not support this feature
	Status map[string]interface{} `json:"Status,omitempty"`
	// usage data
	UsageData *VolumeUsageData `json:"UsageData,omitempty"`
}

// VolumeUsageData 有关卷的用法详细信息。此信息由 “get/system/df” 端点使用，在其他端点中省略。
// VolumeUsageData Usage details about the volume.This information is used by the `GET /system/df` endpoint,and omitted in other endpoints.
type VolumeUsageData struct {
	// 引用此卷的容器数。如果引用计数不可用，则将此字段设置为 “-1”
	// The number of containers referencing this volume.This field is set to `-1` if the reference-count is not available
	// Required: true
	RefCount int64 `json:"RefCount"`
	// 卷使用的磁盘空间量 (以字节为单位)。此信息仅适用于使用 “本地” 卷驱动程序创建的卷。对于使用其他卷驱动程序创建的卷，此字段设置为 “-1” (“不可用”)
	// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `"local"` volume driver.For volumes created with other volume drivers,this field is set to `-1`("not available")
	// Required: true
	Size int64 `json:"Size"`
}
